home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / sml_nj / 93src.lha / src / basics / access.sig next >
Encoding:
Text File  |  1993-01-27  |  1.1 KB  |  49 lines

  1. (* Copyright 1989 by AT&T Bell Laboratories *)
  2. (* access.sig *)
  3.  
  4. signature ACCESS = sig
  5.  
  6.   structure P : PRIMOP
  7.   type primop
  8.   eqtype lvar  (* lambda variable id *)
  9.   type slot  (* position in structure record *)
  10.   type path  (* slot chain relative to lambda variable *)
  11.  
  12.   datatype access 
  13.     = SLOT of slot
  14.     | PATH of path  
  15.     | INLINE of primop
  16.   
  17.   datatype conrep
  18.       = UNTAGGED
  19.       | TAGGED of int
  20.       | TAGGEDREC of int * int
  21.       | UNTAGGEDREC of int
  22.       | CONSTANT of int
  23.       | TRANSPARENT
  24.       | REF
  25.       | VARIABLE of access (* exception constructor *)
  26.       | VARIABLEc of access (* exception constructor without argument *)
  27.  
  28.   val mkLvar : unit -> lvar
  29.   val sameName : lvar * lvar -> unit
  30.   val dupLvar : lvar -> lvar
  31.   val namedLvar : Symbol.symbol -> lvar
  32.   val lvarName : lvar -> string
  33.   val saveLvarNames : bool ref
  34.  
  35.   val pr_lvar: lvar-> string
  36.   and pr_slot: slot -> string
  37.   and pr_path: path-> string
  38.   and pr_access: access-> string
  39.  
  40. (* the different kinds of records *)
  41.   datatype record_kind
  42.     = RK_VECTOR
  43.     | RK_RECORD
  44.     | RK_SPILL
  45.     | RK_CLOSURE
  46.     | RK_CONT
  47.  
  48. end (* signature ACCESS *)
  49.